package com.chengyi.serialport.demo.entity

import androidx.databinding.BaseObservable
import androidx.databinding.Bindable
import androidx.databinding.library.baseAdapters.BR
import com.wyj.utils.annotation.NotProguard
import java.io.Serializable

@NotProguard
class ActivityEntity : Serializable, BaseObservable() {
    companion object {
        fun create(name: String?, activity: String?) = ActivityEntity().apply {
            this.name = name
            this.activity = activity
        }
    }

    @get:Bindable
    var name: String? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.name)
        }

    @get:Bindable
    var activity: String? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.activity)
        }
}